package Lesson;

import java.util.Scanner;

public class Test4 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();

        int bigCount = 0;
        int smallCount = 0;
        int numCount = 0;

        char[] chars = s.toCharArray();

        for (int i = 0; i < chars.length; i++) {
            if(chars[i] >= 'A' && chars[i] <= 'Z'){
                bigCount++;
            } else if (chars[i] >= 'a' && chars[i] <= 'z') {
                smallCount++;
            } else if (chars[i] >= '0' && chars[i] <= '9') {
                numCount++;
            }
        }

        System.out.println(bigCount);
        System.out.println(smallCount);
        System.out.println(numCount);


    }
}
